﻿using System;
using System.Collections.Generic;
using System.Linq;
using MyDMS.DAL;

public partial class AddFolder : PageBaseClass
{
    MyDMSEntity myDmsEntity=new MyDMSEntity();

    protected void Page_Load(object sender, EventArgs e)
    {
        //List<UserFolder> uFolders = uFolderFactory.GetAllBy(UserFolder.UserFolderFields.User_Code, _author.user_Code);
        //List<Folder> uFolders = myDmsEntity.Folder.Where(r => r.User_Code == Author.user_Code).ToList();
    }

    protected void btnSave_Click(object sender, EventArgs e)
    {
        //Folder uFolder = new Folder();
        //uFolder.Folder_Title = txtFolderName.Text;
        //uFolder.Folder_Desc = txtFolderDesc.Text;
        //uFolder.Is_Default = false;
        //uFolder.User_Code = Author.user_Code;
        //uFolder.Creation_Date = DateTime.Now;
        //uFolder.Updation_Date = DateTime.Now;

        //myDmsEntity.DocumentFolder.AddObject(uFolder);

        //if(myDmsEntity.SaveChanges()>0)
        //{
        //    lblMessage.Text = "Success!!";
        //}
        //else
        //{
        //    lblMessage.Text = "Failed";
        //}
        //lblMessage.Visible = true;
    }
}
